<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>定时任务日志管理</title>
	<meta name="decorator" content="adminlte"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/job/scheduleJobLog/">定时任务日志列表</a></li>
		<shiro:hasPermission name="job:scheduleJobLog:edit2"><li><a href="${ctx}/job/scheduleJobLog/form">定时任务日志添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="scheduleJobLog" action="${ctx}/job/scheduleJobLog/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>bean名称：</label>
				<form:input path="beanName" htmlEscape="false" maxlength="200" class="input-medium"/>
			</li>
			<li><label>执行结果：</label>
				<form:select path="jobResult" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('job_result')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>失败信息：</label>
				<form:input path="error" htmlEscape="false" maxlength="2000" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>任务</th>
				<th>bean名称</th>
				<th>方法名</th>
				<th>参数</th>
				<th>执行结果</th>
				<th>失败信息</th>
				<th>耗时(单位：毫秒)</th>
				<th>备注信息</th>
				<shiro:hasPermission name="job:scheduleJobLog:edit2"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="scheduleJobLog">
			<tr>
				<td><a href="${ctx}/job/scheduleJobLog/form?id=${scheduleJobLog.id}">
					${scheduleJobLog.job.id}
				</a></td>
				<td>
					${scheduleJobLog.beanName}
				</td>
				<td>
					${scheduleJobLog.methodName}
				</td>
				<td>
					${scheduleJobLog.params}
				</td>
				<td>
					${fns:getDictLabel(scheduleJobLog.jobResult, 'job_result', '')}
				</td>
				<td>
					${scheduleJobLog.error}
				</td>
				<td>
					${scheduleJobLog.times}
				</td>
				<td>
					${scheduleJobLog.remarks}
				</td>
				<shiro:hasPermission name="job:scheduleJobLog:edit2"><td>
    				<%-- <a href="${ctx}/job/scheduleJobLog/form?id=${scheduleJobLog.id}">修改</a> --%>
					<a href="${ctx}/job/scheduleJobLog/delete?id=${scheduleJobLog.id}" onclick="return confirmx('确认要删除该定时任务日志吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	${page}
</body>
</html>